home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / Caml Light 0.7 / examples / asl / parser.mli < prev    next >
Encoding:
Text File  |  1995-06-01  |  617 b   |  25 lines  |  [TEXT/MPS ]

  1. (* $Id: parser.mli,v 1.4 1995/02/08 18:57:20 xleroy Exp $ *)
  2.  
  3. #open "stream";;
  4. #open "token";;
  5.  
  6. type asl = Const of int
  7.          | Var of int
  8.          | Cond of asl * asl * asl
  9.          | App of asl * asl
  10.          | Abs of string * asl
  11. and top_asl = Decl of string * asl;;
  12.  
  13. exception Unbound of string;;
  14.  
  15. value init_env : string list;;
  16. value global_env : string list ref;;
  17.  
  18. value top : token_type stream -> top_asl;;
  19. value expr : token_type stream -> string list -> asl;;
  20. value expr0 : token_type stream -> string list -> asl;;
  21.  
  22. value print_top : top_asl -> string stream;;
  23. value print_expr : asl -> string stream;;
  24.  
  25.